For a single-predictor (\(p=1\)), unweighted onls fit, the foot point \(\hat\xi_i\) (returned by x0) is obtained by minimizing the plain Euclidean distance between the observation \((x_i, y_i)\) and a point \((\xi_i, f(\xi_i,\hat\theta))\) on the fitted curve,
$$\min_{\xi_i} \sqrt{(x_i-\xi_i)^2 + \left[y_i-f(\xi_i,\hat\theta)\right]^2}.$$
More generally -- for multivariate models (\(p>1\)) and/or fits using weights, sigma_x, or sigma_y -- onls instead minimizes a precision-weighted quadratic form (see 'Details' in onls for the full construction),
$$\min_{\xi_i} \; Qyy_i \left[y_i - f(\xi_i,\hat\theta)\right]^2 + (\xi_i-x_i)^T Qx_i (\xi_i-x_i),$$
which reduces to the plain Euclidean distance above only when \(p=1\) and \(Qyy_i = Qx_i = 1\) (the default, unweighted case) -- Euclidean distance is therefore a special case of the criterion minimized, not the general rule.
x0 returns \(\hat\xi_i\): a length-\(n\) vector for single-predictor models, or an \(n \times p\) matrix (one column per predictor, in the order given by object$pred_names) for multivariate models. y0 returns \(f(\hat\xi_i,\hat\theta)\), always a length-\(n\) vector, since the response is univariate regardless of \(p\).
For single-predictor models, values are returned in the internally-used sorted-predictor order (matching object$pred/object$resp), not necessarily the original row order of the input data; for multivariate models, sorting is a no-op and the original observation order is used.